def compute_crane_speed(actions, verbose=True):
    if verbose:
        print "Computing maximum crane speed...",
    prev_xy = dict()
    prev_t = dict()
    max_xspeed = 0.0
    max_yspeed = 0.0
    for action in actions:
        c = action.meta.crane
        x1, y1 = action.meta.xy
        x0, y0 = prev_xy.get(c, (x1, y1))
        t1 = action.meta.timestamp
        t0 = prev_t.get(c, t1 - 1.0)
        
        max_xspeed = max(max_xspeed, abs(x1 - x0) / float(t1 - t0))
        max_yspeed = max(max_yspeed, abs(y1 - y0) / float(t1 - t0))
        
        prev_xy[c] = x1, y1
        prev_t[c] = t1
    if verbose:
        print (max_xspeed, max_yspeed), "m/s"
    return max_xspeed, max_yspeed
    
    